#define DALI2_COUNT 5

#include "../bulk_storage/bulk_storage.h"

/**

  An updated daliesque that takes amino acid types into account.  It
  uses a substitution matrix to calulate the distance, and therefore
  d(a,a) might not be zero.  (In fact, it almost never is!)

  \ingroup Neighborhoods

*/

struct daliesque2 {
  char pdbStructure[4];
  short aa_residue_serial;
  char chain;
  short paird[(DALI2_COUNT * (DALI2_COUNT+1)) / 2];
  unsigned char aa_indices[DALI2_COUNT+1];
};

/**
   \ingroup NeighborhoodConstructor
*/
void daliesque2_constructor(const char* pdbCode,
			   void * neighp,
			   struct store * atomStore,
			   off_t center,
			   off_t neighbors[],
			   short count);

/**
   \ingroup NeighborhoodDistance
*/
double daliesque2_distance(struct daliesque2 * d1, struct daliesque2 * d2);

/**
   Because daliesque2 currently only relies on side-chain mass centers, this function just calls can_calculate_aa_mass_center.

   @return true if a mass center can be calculated for the amino acid that contains atom i.

   \ingroup CanCalculateNeighborhood 
*/
int daliesque2_can_calculate_neighborhood(struct store * s, off_t i);

/**
   Print out dali neighborhood in a format appropriate for query result output
*/

const void * daliesque2_print(const void * d, void * state);
